.class public Lcom/brixd/niceapp/activity/fragment/CommentWindow;
.super Landroid/widget/PopupWindow;
.source "CommentWindow.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/activity/fragment/CommentWindow$OnCommitListener;
    }
.end annotation


# instance fields
.field private mAppModel:Lcom/brixd/niceapp/model/AppModel;

.field private mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mComment:Landroid/widget/EditText;

.field private mContext:Landroid/content/Context;

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mOnCommitListener:Lcom/brixd/niceapp/activity/fragment/CommentWindow$OnCommitListener;

.field private mShareToWeibo:Landroid/widget/CheckBox;

.field private mToast:Landroid/widget/Toast;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/brixd/niceapp/model/AppModel;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "appModel"    # Lcom/brixd/niceapp/model/AppModel;

    .prologue
    .line 37
    invoke-direct {p0}, Landroid/widget/PopupWindow;-><init>()V

    .line 38
    iput-object p1, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mContext:Landroid/content/Context;

    .line 39
    iput-object p2, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mAppModel:Lcom/brixd/niceapp/model/AppModel;

    .line 41
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->initWidgets()V

    .line 42
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->initWidgetActions()V

    .line 44
    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/fragment/CommentWindow;

    .prologue
    .line 25
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->reset()V

    return-void
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)Landroid/widget/EditText;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/fragment/CommentWindow;

    .prologue
    .line 25
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mComment:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$200(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)Landroid/widget/Toast;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/fragment/CommentWindow;

    .prologue
    .line 25
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mToast:Landroid/widget/Toast;

    return-object v0
.end method

.method static synthetic access$202(Lcom/brixd/niceapp/activity/fragment/CommentWindow;Landroid/widget/Toast;)Landroid/widget/Toast;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/fragment/CommentWindow;
    .param p1, "x1"    # Landroid/widget/Toast;

    .prologue
    .line 25
    iput-object p1, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mToast:Landroid/widget/Toast;

    return-object p1
.end method

.method static synthetic access$300(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/fragment/CommentWindow;

    .prologue
    .line 25
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$400(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)Lcom/brixd/niceapp/activity/fragment/CommentWindow$OnCommitListener;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/fragment/CommentWindow;

    .prologue
    .line 25
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mOnCommitListener:Lcom/brixd/niceapp/activity/fragment/CommentWindow$OnCommitListener;

    return-object v0
.end method

.method static synthetic access$500(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)Landroid/widget/CheckBox;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/fragment/CommentWindow;

    .prologue
    .line 25
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mShareToWeibo:Landroid/widget/CheckBox;

    return-object v0
.end method

.method private initWidgetActions()V
    .registers 3

    .prologue
    .line 79
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->getContentView()Landroid/view/View;

    move-result-object v0

    const v1, 0x7f0a002d

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    new-instance v1, Lcom/brixd/niceapp/activity/fragment/CommentWindow$2;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow$2;-><init>(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 87
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->getContentView()Landroid/view/View;

    move-result-object v0

    const v1, 0x7f0a0032

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    new-instance v1, Lcom/brixd/niceapp/activity/fragment/CommentWindow$3;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow$3;-><init>(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 108
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->getContentView()Landroid/view/View;

    move-result-object v0

    const v1, 0x7f0a00ed

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    new-instance v1, Lcom/brixd/niceapp/activity/fragment/CommentWindow$4;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow$4;-><init>(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 115
    return-void
.end method

.method private initWidgets()V
    .registers 9

    .prologue
    const v7, 0x7f0200b3

    const/4 v6, 0x1

    const/4 v5, -0x1

    .line 47
    iget-object v2, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mContext:Landroid/content/Context;

    const v3, 0x7f03003f

    const/4 v4, 0x0

    invoke-static {v2, v3, v4}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->setContentView(Landroid/view/View;)V

    .line 48
    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->setWidth(I)V

    .line 49
    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->setHeight(I)V

    .line 50
    new-instance v0, Landroid/graphics/drawable/ColorDrawable;

    iget-object v2, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f080022

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    invoke-direct {v0, v2}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    .line 51
    .local v0, "bg":Landroid/graphics/drawable/ColorDrawable;
    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 52
    invoke-virtual {p0, v6}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->setFocusable(Z)V

    .line 53
    const v2, 0x7f0d001d

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->setAnimationStyle(I)V

    .line 54
    const/16 v2, 0x15

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->setSoftInputMode(I)V

    .line 55
    invoke-virtual {p0, v5, v5}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->setWindowLayoutMode(II)V

    .line 57
    new-instance v2, Lcom/brixd/niceapp/activity/fragment/CommentWindow$1;

    invoke-direct {v2, p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow$1;-><init>(Lcom/brixd/niceapp/activity/fragment/CommentWindow;)V

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->setOnDismissListener(Landroid/widget/PopupWindow$OnDismissListener;)V

    .line 65
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->getContentView()Landroid/view/View;

    move-result-object v2

    const v3, 0x7f0a00ec

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/EditText;

    iput-object v2, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mComment:Landroid/widget/EditText;

    .line 66
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->getContentView()Landroid/view/View;

    move-result-object v2

    const v3, 0x7f0a00b5

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/CheckBox;

    iput-object v2, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mShareToWeibo:Landroid/widget/CheckBox;

    .line 67
    invoke-virtual {p0}, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->getContentView()Landroid/view/View;

    move-result-object v2

    const v3, 0x7f0a002f

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    .line 69
    .local v1, "icon":Landroid/widget/ImageView;
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v2

    iput-object v2, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 70
    new-instance v2, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    invoke-virtual {v2, v6}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    invoke-virtual {v2, v6}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    invoke-virtual {v2, v6}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    sget-object v3, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    .line 71
    invoke-virtual {v2, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    sget-object v3, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-virtual {v2, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    new-instance v3, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v3}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    invoke-virtual {v2, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    .line 72
    invoke-virtual {v2, v7}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    invoke-virtual {v2, v7}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    .line 73
    invoke-virtual {v2, v7}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    invoke-virtual {v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v2

    iput-object v2, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 75
    iget-object v2, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mAppModel:Lcom/brixd/niceapp/model/AppModel;

    invoke-virtual {v3}, Lcom/brixd/niceapp/model/AppModel;->getIconUrl()Ljava/lang/String;

    move-result-object v3

    iget-object v4, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v2, v3, v1, v4}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 76
    return-void
.end method

.method private reset()V
    .registers 3

    .prologue
    .line 118
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mComment:Landroid/widget/EditText;

    const-string v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 119
    iget-object v0, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mShareToWeibo:Landroid/widget/CheckBox;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 120
    return-void
.end method


# virtual methods
.method public setOnCommitListener(Lcom/brixd/niceapp/activity/fragment/CommentWindow$OnCommitListener;)V
    .registers 2
    .param p1, "l"    # Lcom/brixd/niceapp/activity/fragment/CommentWindow$OnCommitListener;

    .prologue
    .line 127
    iput-object p1, p0, Lcom/brixd/niceapp/activity/fragment/CommentWindow;->mOnCommitListener:Lcom/brixd/niceapp/activity/fragment/CommentWindow$OnCommitListener;

    .line 128
    return-void
.end method
